Shared buffer for data communications routed through hub

ABSTRACT

Various techniques are provided for selectively allocating a buffer adapted to be shared for storage media device data communications and downstream device data communications routed through a hub. For example, in one embodiment, a method includes detecting if one or more downstream devices are connected to one or more downstream device ports of the hub. The method also includes, if any downstream devices are detected: allocating a first portion of the buffer for a storage media device controller, allocating one or more second portions of the buffer for the detected downstream devices, wherein each of the second portions is associated with a corresponding one of the detected downstream devices, and passing the storage media device data communications between a host device and the storage media device controller through the first portion of the buffer and not the second portions of the buffer.

BACKGROUND

1. Field of the Invention

The present invention generally relates to the interfacing of externaldevices with host devices and, more particularly, to the buffering ofdata transferred between such devices.

2. Related Art

As is well known, various types of interfaces may be used to facilitatedata communication between host devices (e.g., computers or otherdevices) and external devices (e.g., hard drives or other devices). Inparticular, Universal Serial Bus (USB) ports have become a common way toattach hard drives and other types of external storage media devices tohost computer systems with high performance.

The number of available USB ports is often a limiting factor in hostcomputers. Because USB is a point-to-point master/slave bus,USB-compatible devices typically include only a single USB port. Thus,if users connect several storage media devices or other devices, the USBports of the host computer may be quickly exhausted.

One approach to this problem involves the use of a USB hub which may beconnected to a single USB port of the host computer to provideadditional USB ports. Conventional USB hubs, and particularly hubssupporting the USB 3.0 specification, typically provide at least onededicated data buffer for each port. For example, a USB hub providingfour USB ports may include four data buffers. Typically, these databuffers are relatively small in size (e.g., approximately 10 kbits).

To connect an external storage media device to a USB port and achieve ahigh level of performance, it is typically necessary to provide astorage media device controller and an associated data buffer that issignificantly larger (e.g., approximately 32 kbits) than conventionalUSB data buffers. However, an arrangement that includes both aconventional USB hub and a conventional storage media device controllermay result in undesirable latency for storage media device datacommunications. In this regard, data communications passed from the hostdevice to the USB hub are buffered by the USB hub data buffer. The datacommunications are then passed from the USB hub to the storage mediadevice controller wherein they are further buffered by the storage mediadevice controller data buffer. Similarly, data communications passedfrom storage media devices are buffered by the storage media devicecontroller data buffer and then further buffered by the USB hub databuffer before being received by the host device.

Consequently, data throughput between the host device and storage mediadevices may suffer when the storage media device is connected through aUSB hub. Such problems may be especially apparent when the USB hub isused for high speed data transfers, such as data communications betweena host computer and storage media devices connected to USB ports of theUSB hub. Additionally, the buffer in the hub and the buffer in thestorage media device controller are a duplication of resources, whichresults in a higher cost. Accordingly, there is a need for an improvedapproach for interfacing various devices with host devices.

SUMMARY

Various techniques are provided for selectively allocating a bufferadapted to be shared for storage media device data communications anddownstream device data communications routed through a hub. For example,in one embodiment, a method of selectively allocating a buffer adaptedto be shared for storage media device data communications and downstreamdevice data communications routed through a hub includes detecting ifone or more downstream devices are connected to one or more downstreamdevice ports of the hub; and if any downstream devices are detected:allocating a first portion of the buffer for a storage media devicecontroller, allocating one or more second portions of the buffer for thedetected downstream devices, wherein each of the second portions isassociated with a corresponding one of the detected downstream devices,and passing the storage media device data communications between a hostdevice and the storage media device controller through the first portionof the buffer and not the second portions of the buffer.

In another embodiment, a device includes a host device port adapted tointerface with a host device; one or more downstream device portsadapted to interface with one or more downstream devices; a storagemedia device controller; a hub; and a buffer adapted to be shared forstorage media device data communications and downstream device datacommunications routed through the hub, wherein the hub is adapted to:detect if one or more downstream devices are connected to the one ormore downstream device ports, and if any downstream devices aredetected, allocate a first portion of the buffer for the storage mediadevice controller, allocate one or more second portions of the bufferfor the detected downstream devices, wherein each of the second portionsis associated with a corresponding one of the detected downstreamdevices, and pass the storage media device data communications betweenthe host device and the storage media device controller through thefirst portion of the buffer and not the second portions of the buffer.

In another embodiment, a device includes a host device port adapted tointerface with a host device; one or more downstream device portsadapted to interface with one or more downstream devices; a storagemedia device controller; a buffer adapted to be shared for storage mediadevice data communications and downstream device data communications;means for detecting if one or more downstream devices are connected tothe one or more downstream device ports; means for allocating a firstportion of the buffer for the storage media device controller; means forallocating one or more second portions of the buffer for the detecteddownstream devices, wherein each of the second portions is associatedwith a corresponding one of the detected downstream devices, and meansfor passing the storage media device data communications between a hostdevice and the storage media device controller through the first portionof the buffer and not the second portions of the buffer.

In another embodiment, a device includes a host device port adapted tointerface with a host device; a storage media device; one or moredownstream device ports adapted to interface with one or more downstreamdevices; and a hub adapted to pass downstream device data communicationsbetween the host device and the downstream devices.

The scope of the invention is defined by the claims, which areincorporated into this section by reference. A more completeunderstanding of embodiments of the present invention will be affordedto those skilled in the art, as well as a realization of additionaladvantages thereof, by a consideration of the following detaileddescription of one or more embodiments. Reference will be made to theappended sheets of drawings that will first be described briefly.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates a system including a host device and an externaldevice in accordance with an embodiment of the invention.

FIGS. 2-4 illustrate buffers in accordance with embodiments of theinvention.

FIG. 5 illustrates a process of selectively configuring a hub to supportthe interfacing of various devices with a host device in accordance withan embodiment of the invention.

Embodiments of the present invention and their advantages are bestunderstood by referring to the detailed description that follows. Itshould be appreciated that like reference numerals are used to identifylike elements illustrated in one or more of the figures.

DETAILED DESCRIPTION

In accordance with embodiments further discussed herein, varioustechniques are provided for selectively allocating a buffer adapted tobe shared for storage media device data communications and downstreamdevice data communications routed through a hub. For example, a hub maybe integrated with a storage media device controller and provided in anexternal storage media device enclosure that may be used to interface ahost device with storage media devices and/or other devices connected toports of the hub. Advantageously, the hub may include a shared bufferthat may be selectively configured to buffer data for storage mediadevices and/or other devices. The use of a shared buffer may providereduced latency in the transfer of data between the host device anddevices connected to ports of the hub. These and other embodiments arefurther described herein with reference to storage media deviceenclosures. However, these techniques may be applied to any type ofexternal device as may be appropriate in particular embodiments.

Referring now to the drawings which are provided for purposes ofillustrating embodiments of the invention, and not for purposes oflimiting the same, FIG. 1 illustrates a system 100 including a hostdevice 110 and an external device 120 in accordance with an embodimentof the invention. Host device 110 may be implemented, for example, by aprogrammable computer system, dedicated hardware, or otherconfigurations. External device 120 may be implemented, for example as astorage media device enclosure with a hub 130 or other configurations.

Host device 110 may be configured to interface with external device 120through host device ports 112 and 122 over a bus 115. In thisembodiment, host device ports 112/122 and bus 115 are implemented inaccordance with USB 3.0 interface standards. In other embodiments, thesecomponents may be implemented in accordance with other interfaces suchas, for example, USB 2.0, Firewire (e.g., IEEE 1394), or others.

Hub 130 which may be implemented to support a plurality of USB ports 150and a plurality of storage media device ports 160. In this regard, hub130 may support communications between host device 110 and a pluralityof downstream USB devices 170 through ports 150 and busses 155. In thisembodiment, ports 150, buses 155, and devices 170 are implemented inaccordance with USB 3.0 interface standards. In other embodiments, thesecomponents may be implemented in accordance with other interfaces suchas, for example, USB 2.0, Firewire, or others.

Hub 130 may also support communications between host device 110 and aplurality of storage media devices 180 through storage media deviceports 160 and busses 165. Such storage media devices 180 may include,for example, hard drives, flash drives (e.g., thumb drives, solid statedrives, or others), optical storage media (e.g., CD-ROM, DVD, HD-DVD,Blu-Ray, or others), or any other appropriate storage media devices. Forexample, in several embodiments, storage media device ports 160 andbusses 165 may be connected with storage media devices 180 in accordancewith Serial Advanced Technology Attachment (SATA) interfaces, externalSATA (eSATA) interfaces, Parallel Advanced Technology Attachment (PATA)interfaces, flash memory interfaces, or others.

Storage media devices 180 may include one or more storage media devices180(1) external to device 120, and may further include one or morestorage media devices 180(n) internal to device 120. In one embodiment,device 120 may be implemented as a storage media device enclosure (e.g.,a hard drive enclosure or an enclosure supporting one or more types ofstorage media devices) including one or more internal storage mediadevices 180(n). Such internal storage media devices 180(n) may beimplemented, for example, as removable storage media devices or fixedstorage media devices. Advantageously, the use of internal storage mediadevices 180(n) may reduce the number of cables (e.g., eSATA cables orother types of cables used to connect storage media devices 180) used bysystem 100.

As shown in FIG. 1, hub 130 includes a processor 132, a memory 134, aroute table 136, a buffer 138, and a storage media device controller140. In the embodiment shown in FIG. 1, storage media device controller140 is integrated with hub 130. As a result, storage media devicecontroller 140 may share the resources of other components of hub 130,and materials costs (e.g., silicon costs) may be reduced in comparisonwith other embodiments in which storage media device controller 140 isnot integrated with hub 130. Processor 132 may be configured withappropriate software (e.g., a computer program for execution byprocessor 132) that is stored on a machine readable medium 190 (e.g., aCD-ROM or other appropriate storage media) and/or in memory 134 toinstruct processor 132 to perform one or more of the operationsdescribed herein with regard to hub 130.

Route table 136 may be used to route, communications between host device110 and one or more USB devices 170 through hub 130. In this regard,route table 136 may be populated by processor 132 with various deviceidentifiers associated with USB devices 170 to route suchcommunications. Storage media device controller 140 may support datacommunications between host device 110 and storage media devices 180.

Buffer 138 may be implemented as a shared buffer that may be selectivelyallocated to buffer data for USB devices 170 and/or storage mediadevices 180. For example, in one embodiment, portions of buffer 138 maybe allocated for USB devices 170 to buffer data communications betweenhost device 110 and USB devices 170, and other portions of buffer 138may be allocated for storage media device controller 140 to buffer datacommunications between host device 110 and storage media devices 180(e.g., which communicate with host device 110 through storage mediadevice controller 140). In another embodiment, the entirety of buffer138 may be allocated for storage media device controller 140.

Data communications between host device 110 and storage media devices180 may be passed through buffer 138 without being further buffered byconventional USB data buffers in hub 130. As a result, high datathroughput between host device 110 and storage media devices 180 may bemaintained without suffering excessive latency associated withconventional USB data buffers.

FIGS. 2-4 illustrate buffers 200, 300, and 400 which may, for example,be used to implement buffer 138 of hub 130 in various embodiments. Asshown in FIG. 2, buffer 200 has been configured with portions 210allocated for USB devices 170. For example, a portion 210(1) has beenallocated for data communications between host device 110 and USB device170(1), and a portion 210(m) has been allocated for data communicationsbetween host device 110 and USB device 170(m). In addition, a portion220 has been allocated for storage media device controller 140.

As shown in FIG. 3, buffer 300 has been configured with a portion 320allocated for storage media device controller 140. In this embodiment,portion 320 corresponds to substantially all of buffer 300.

As shown in FIG. 4, buffer 400 has been configured with portions 410allocated for USB devices 170. For example, a portion 410(1) has beenallocated for data communications between host device 110 and USB device170(1), and a portion 410(m) has been allocated for data communicationsbetween host device 110 and USB device 170(m). In addition, a portion420 corresponding to substantially all of buffer 400 has been allocatedfor storage media device controller 140. As shown in FIG. 4, one or moreof the allocated portions of buffer 400 may overlap with each other. Inthis regard, buffer 400 may be managed dynamically to switch theoperation of buffer 400 such that the same memory locations in buffer400 may be used for different purposes at different times. For example,when hub 130 is passing data communications between host device 110 andUSB devices 170, then the allocations corresponding to portions 410 maybe used. At a different time when hub 130 is passing data communicationsbetween host device 110 and storage media devices 180, then theoperation of buffer 400 may be switched such that the allocationcorresponding to portion 420 may be used. As a result, substantially allof buffer 400 may be used for storage media device data communicationswithout interfering with USB device data communications occurring atother times. The allocations of various portions of buffers 200, 300,and 400 may be further understood with reference to the process of FIG.5.

FIG. 5 illustrates a process of selectively configuring hub 130 tosupport the interfacing of USB devices 170 and storage media devices 180with host device 110 in accordance with an embodiment of the invention.

In step 510, external device 120 is connected to host device 110 by bus115. For example, in one embodiment, an appropriate interface cable maybe connected between host device ports 112 and 122 to provide bus 115.

In step 515, host device 110 begins a USB enumeration process in orderto register any connected devices with host device 110. For example,host device 110 may issue an enumeration request to external device 120during step 515. As further described herein, hub 130 and storage mediadevice controller 140 may be recognized as separate devices and may beseparately registered (e.g., enumerated) with host device 110 atdifferent times.

In step 520, hub 130 and storage media device controller 140 delaysending responses to the enumeration request of step 515. In thisregard, such responses may be selectively sent by hub 130 and/or storagemedia device controller 140 based on the results of further stepsperformed during the process of FIG. 5.

In step 525, hub 130 determines (e.g., detects) whether one or more USBdevices 170 are connected to USB ports 150. If one or more USB devices170 are connected, then the process continues to steps 530-545.Otherwise, the process continues to step 550.

In step 530 (e.g., performed if one or more USB devices 170 weredetected in step 525), hub 130 allocates one or more portions of buffer138 for the connected USB devices 170 and also allocates one or moreportions of buffer 138 for storage media device controller 140. Forexample, in one embodiment, hub 130 may allocate one or more of portions210 and 220 shown in FIG. 2 corresponding to one or more of USB devices170 and storage media devices 180. In another embodiment, hub 130 mayallocate one or more of portions 410 and 420 shown in FIG. 4corresponding to one or more of USB devices 170 and storage mediadevices 180 (e.g., in an embodiment where dynamic buffer management isused).

In step 535, hub 130 enables route table 136. In this regard, hub 130may populate route table 136 with appropriate identifiers associatedwith USB devices 170 for routing data communications between host device110 and USB devices 170.

In step 540, hub 130 may enable dynamic buffer management. If enabled,such dynamic buffer management may permit buffer 138 to be used in asimilar manner as described with regard to buffer 400 if desired. Forexample, overlapping locations of buffer 138 may be used for differentallocated portions of buffer 138 as described. As a result, when hub 130operates in an active state (e.g., in step 460), hub 130 may dynamicallyswitch between operating buffer 138 in accordance with differentallocations (e.g., when hub 130 is passing data communications betweenhost device 110 and USB devices 170 then the allocations correspondingto portions 410 may be used, and at a different time when hub 130 ispassing data communications between host device 110 and storage mediadevices 180 then the allocation corresponding to portion 420 may beused).

In step 545, hub 130 is enumerated to host device 110. For example, inone embodiment, hub 130 may send a response to host device 110 in replyto the enumeration request issued in step 515. As a result, host device110 may register hub 130 as a device connected over bus 115.

In step 550 (e.g., performed if no USB devices 170 were detected in step525), hub 130 allocates substantially all of buffer 138 for storagemedia device controller 140. For example, in one embodiment, hub 130 mayallocate portion 320 shown in FIG. 3.

In step 555 (e.g., performed whether or not any USB devices 170 weredetected in step 525), storage media device controller 140 is enumeratedto host device 110. For example, in one embodiment, storage media devicecontroller 140 may send a response to host device 110 in reply to theenumeration request issued in step 515. As a result, host device 110 mayregister storage media device controller 140 as a device connected overbus 115.

In step 560, hub 130 operates in an active state in accordance with theallocations made to buffer 138. In one case, if one or more downstreamUSB devices 170 are connected to hub 130, then various portions ofbuffer 138 (e.g., portions 210) may be allocated to support USB devices170, and other portions (e.g., portion 220) may be allocated to supportstorage media device controller 140 (e.g., in accordance with dynamicbuffer management or otherwise). In another case, no downstream USBdevices 170 are connected to hub 130, then substantially all of buffer138 (e.g., portion 320) may be allocated to support storage media devicecontroller 140.

In either case, data communications between host 110 and storage mediadevices 180 may be passed through buffer 138 without being furtherbuffered by conventional USB data buffers. Thus, even if USB devices 170are connected to hub 130, data communications for such devices may bebuffered by portions of buffer 138 different from the portions used tobuffer data communications for storage media device controller 140. As aresult, high data throughput between host device 110 and storage mediadevices 180 may be maintained without suffering excessive latencyassociated with conventional USB data buffers.

Advantageously, the use of external device 120 permits storage mediadevice data communications to be routed between host device 110 andmultiple storage media devices 180 without using more than one USB port(e.g., host port 112) of host device 110. For example, multiple externaldevices 120 may be daisy chained together such that host ports 122 ofadditional external devices 120 may be connected to USB ports 150 ofother external devices 120. If such external devices 120 are implementedas external storage media device enclosures including internal storagemedia devices 180(n), then such an arrangement may permit a user toconveniently connect large numbers of storage media devices to hostdevice 110 through short or long USB cables as may be desired inparticular applications.

Other embodiments are also contemplated which may leverage the abilityof hub 130 to know the types of devices and/or storage media devicesconnected to USB ports 150 and/or storage media device ports 160, andthe ability of hub 130 to control data communications through suchports. In one embodiment, appropriate operations may be performed byprocessor 132, memory 134, and/or storage media device controller 140 totreat one or more of storage media devices 180 as extensions of eachother such that host device 110 perceives storage media devices 180 as asingle storage media device. For example, storage media devices 180(1)and 180(n) may be configured as a RAID array to provide larger capacityand/or redundancy.

In another embodiment, appropriate operations may be performed byprocessor 132, memory 134, and/or storage media device controller 140 toperform automated backups between storage media devices 180 (e.g.,storage media device 180(1) may be a backup drive to storage mediadevice 180(n)) without requiring intervention by host device 110.

In another embodiment, appropriate operations may be performed byprocessor 132, memory 134, and/or storage media device controller 140 tooptimize storage media device data communications between storage mediadevices 180. For example, external device 120 may be configured topermit copying between various storage media devices 180 withoutrequiring intervention by host device 110. Such an arrangement mayimprove such copying by, for example, approximately 50% over otherarrangements that may pass such storage media device data communicationsfrom storage media devices 180 to host device 110 and back to storagemedia devices 180 for copying.

In another embodiment, appropriate operations may be performed byprocessor 132, memory 134, and/or storage media device controller 140 touse faster storage media devices 180 as caches for slower storage mediadevices. For example, if storage media device 180(n) is implemented as asolid state drive, then storage media device 180(n) may be used as acache for storage media device 180(1), thus improving performance.

Where applicable, various embodiments provided by the present disclosuremay be implemented using hardware, software, or combinations of hardwareand software. Also where applicable, the various hardware componentsand/or software components set forth herein may be combined intocomposite components comprising software, hardware, and/or both withoutdeparting from the spirit of the present disclosure. Where applicable,the various hardware components and/or software components set forthherein may be separated into sub-components comprising software,hardware, or both without departing from the spirit of the presentdisclosure. In addition, where applicable, it is contemplated thatsoftware components may be implemented as hardware components, andvice-versa.

Software in accordance with the present disclosure, such as program codeand/or data, may be stored on one or more machine readable mediums. Itis also contemplated that software identified herein may be implementedusing one or more general purpose or specific purpose computers and/orcomputer systems, networked and/or otherwise. Where applicable, theordering of various steps described herein may be changed, combined intocomposite steps, and/or separated into sub-steps to provide featuresdescribed herein.

Embodiments described above illustrate but do not limit the invention.It should also be understood that numerous modifications and variationsare possible in accordance with the principles of the present invention.Accordingly, the scope of the invention is defined only by the followingclaims.

1. A method of selectively allocating a buffer adapted to be shared forstorage media device data communications and downstream device datacommunications routed through a hub, the method comprising: detecting ifone or more downstream devices are connected to one or more downstreamdevice ports of the hub; and if any downstream devices are detected:allocating a first portion of the buffer for a storage media devicecontroller, allocating one or more second portions of the buffer for thedetected downstream devices, wherein each of the second portions isassociated with a corresponding one of the detected downstream devices,and passing the storage media device data communications between a hostdevice and the storage media device controller through the first portionof the buffer and not the second portions of the buffer.
 2. The methodof claim 1, further comprising passing the downstream device datacommunications between the host device and the detected downstreamdevices through the second portions of the buffer and not the firstportion of the buffer.
 3. The method of claim 2, wherein the firstportion of the buffer and at least one of the second portions of thebuffer overlap with each other, the method further comprising switchingbetween: using the first portion of the buffer to pass the storage mediadevice data communications; and using the at least one of the secondportions of the buffer to pass the downstream device datacommunications.
 4. The method of claim 2, further comprising: populatinga route table with device identifiers associated with the detecteddownstream devices; and routing the downstream device datacommunications using the route table.
 5. The method of claim 1, furthercomprising: if no downstream devices are detected: allocating a thirdportion of the buffer comprising substantially all of the buffer for thestorage media device controller; and passing the storage media devicedata communications between the host device and the storage media devicecontroller through the third portion of the buffer.
 6. The method ofclaim 1, further comprising: receiving a Universal Serial Bus (USB)enumeration request from the host device; and delaying providing aresponse to the USB enumeration request to register the storage mediadevice controller with the host device until at least after the bufferhas been allocated.
 7. The method of claim 1, wherein the downstreamdevice ports are Universal Serial Bus (USB) 3.0 ports and the detecteddownstream devices are USB 3.0 devices.
 8. The method of claim 1,wherein the hub further comprises a plurality of storage media deviceports adapted to interface one or more storage media devices with thestorage media device controller.
 9. The method of claim 8, wherein thehub is implemented in a storage media device enclosure and at least oneof the storage media device ports is adapted to be connected to astorage media device in the storage media device enclosure.
 10. Themethod of claim 8, wherein the storage media device ports are SerialAdvanced Technology Attachment (SATA) ports.
 11. The method of claim 8,wherein the storage media device ports are flash memory interface ports.12. The method of claim 8, further comprising operating the storagemedia devices such that the host device perceives the storage mediadevices as a single storage media device.
 13. The method of claim 8,further comprising transferring data between the storage media deviceswithout intervention by the host device.
 14. The method of claim 8,further comprising operating at least a first one of the storage mediadevices as a cache for at least a second one of the storage mediadevices.
 15. The method of claim 1, wherein the storage media devicecontroller is integrated with the hub.
 16. A device comprising: a hostdevice port adapted to interface with a host device; one or moredownstream device ports adapted to interface with one or more downstreamdevices; a storage media device controller; a hub; and a buffer adaptedto be shared for storage media device data communications and downstreamdevice data communications routed through the hub, wherein the hub isadapted to: detect if one or more downstream devices are connected tothe one or more downstream device ports, and if any downstream devicesare detected, allocate a first portion of the buffer for the storagemedia device controller, allocate one or more second portions of thebuffer for the detected downstream devices, wherein each of the secondportions is associated with a corresponding one of the detecteddownstream devices, and pass the storage media device datacommunications between the host device and the storage media devicecontroller through the first portion of the buffer and not the secondportions of the buffer.
 17. The device of claim 16, wherein the hub isfurther adapted to pass the downstream device data communicationsbetween the host device and the detected downstream devices through thesecond portions of the buffer and not the first portion of the buffer.18. The device of claim 17, wherein the first portion of the buffer andat least one of the second portions of the buffer overlap with eachother, and wherein the hub is further adapted to switch between: usingthe first portion of the buffer to pass the storage media device datacommunications; and using the at least one of the second portions of thebuffer to pass the downstream device data communications.
 19. The deviceof claim 17, wherein: the hub comprises a route table adapted to storedevice identifiers associated with the detected downstream devices; andthe hub is adapted to populate the route table with the deviceidentifiers and route the downstream device data communications usingthe route table.
 20. The device of claim 16, wherein the hub is furtheradapted to, if no downstream devices are detected: allocate a thirdportion of the buffer comprising substantially all of the buffer for thestorage media device controller; and pass the storage media device datacommunications between the host device and the storage media devicecontroller through the third portion of the buffer.
 21. The device ofclaim 16, wherein the hub is further adapted to: receive a UniversalSerial Bus (USB) enumeration request from the host device; and delay aresponse to the USB enumeration request to register the storage mediadevice controller with the host device until at least after the bufferhas been allocated.
 22. The device of claim 16, wherein the downstreamdevice ports are Universal Serial Bus (USB) 3.0 ports and the detecteddownstream devices are USB 3.0 devices.
 23. The device of claim 16,wherein the device further comprises a plurality of storage media deviceports adapted to interface one or more storage media devices with thestorage media device controller.
 24. The device of claim 23, wherein thedevice is a storage media device enclosure and at least one of thestorage media device ports is adapted to be connected to a storage mediadevice in the storage media device enclosure.
 25. The device of claim23, wherein the storage media device ports are Serial AdvancedTechnology Attachment (SATA) ports.
 26. The device of claim 23, whereinthe storage media device ports are flash memory interface ports.
 27. Thedevice of claim 23, wherein the device is adapted to operate the storagemedia devices such that the host device perceives the storage mediadevices as a single storage media device.
 28. The device of claim 23,wherein the device is adapted to transfer data between the storage mediadevices without intervention by the host device.
 29. The device of claim23, wherein the device is adapted to operate at least a first one of thestorage media devices as a cache for at least a second one of thestorage media devices.
 30. The device of claim 16, wherein the storagemedia device controller is integrated with the hub.
 31. A devicecomprising: a host device port adapted to interface with a host device;one or more downstream device ports adapted to interface with one ormore downstream devices; a storage media device controller; a bufferadapted to be shared for storage media device data communications anddownstream device data communications; means for detecting if one ormore downstream devices are connected to the one or more downstreamdevice ports; means for allocating a first portion of the buffer for thestorage media device controller; means for allocating one or more secondportions of the buffer for the detected downstream devices, wherein eachof the second portions is associated with a corresponding one of thedetected downstream devices, and means for passing the storage mediadevice data communications between a host device and the storage mediadevice controller through the first portion of the buffer and not thesecond portions of the buffer.